import Cookies from 'js-cookie'
import website from '@/config/website'
const Authorization = website.Authorization
export function getToken() {
    return Cookies.get(Authorization)
}

export function setToken(token) {
    var inFifteenMinutes = new Date(new Date().getTime() + token.expiresIn * 1000);
    return Cookies.set(Authorization, token.accessToken, { expires: inFifteenMinutes })
}

export function removeToken() {
    return Cookies.remove(Authorization)
}